home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGASIC / BASFILES.LZH / QBTXSECR.BAS < prev    next >
BASIC Source File  |  1988-09-10  |  899b  |  40 lines

  1. '$INCLUDE:'QBTOOLS.INC'
  2. '' '$INCLUDE: 'qbtools2.inc'
  3. '' '$INCLUDE: 'qbt2indx.inc'
  4. '' '-------------------------Standard Include Merge Section-------------------
  5.  
  6.  
  7.  
  8. DEFSNG A-Z
  9.     SUB IndexSecure (IxNum%, Xnm$(), Xk$(), Xh%(), Sc%) STATIC
  10.  
  11.         ' Secure the header information by opening, writing and
  12.         ' closing the associated header file.
  13.  
  14.         ' Errors:
  15.         '
  16.         ' Sc% = -1 if there are no available file handles
  17.         '   ELSE
  18.         ' Sc% = 0
  19.  
  20.  
  21.         Sc% = 0
  22.         w% = FREEFILE
  23.         IF w% = 0 THEN
  24.             Sc% = -1  ' No available file handles
  25.             EXIT SUB
  26.         END IF
  27.  
  28.         OPEN "R", w%, Xnm$(IxNum%) + ".hdr", 512
  29.         FIELD #w%, 32 AS desc$, 32 AS xmast$, 2 AS klen$, 2 AS nok$, 2 AS nexav$
  30.         FIELD #w%, 70 AS twit$, 2 AS kdel$, 440 AS spare$
  31.         GET #w%, 1
  32.         LSET nok$ = MKI$(Xh%(IxNum%, 2))
  33.         LSET nexav$ = MKI$(Xh%(IxNum%, 3))
  34.         LSET kdel$ = MKI$(Xh%(IxNum%, 4))
  35.         PUT #w%, 1
  36.         CLOSE w%
  37.  
  38.     END SUB
  39.  
  40.